package learning.byteStream;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
 
public class ByteArrInputStream2 {
	public static void main(String[] args) {
		String str="I come from China";
		byte[] b =str.getBytes();
		ByteArrayOutputStream bos=new ByteArrayOutputStream();
		ByteArrayInputStream bis = new ByteArrayInputStream(b);
		
//		bis.read();
		p((char)bis.read());
		try {
			bis.close();
//			p((char)bis.read());
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	static void p(Object o){
		System.out.println(o);
	}
}